Refactor test suites to use BasicPacket encode/decode cycles and unified cross-platform compatibility matrix - #26
Conversation
…oss-platform validation Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
…tual C++ API Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
|
These tests should just be a single matrix instead of showing serialization and deserialization separately: The compatibility matrix should also display data for C to C and CPP to CPP and python to python results. |
…ingle compatibility matrix with self-tests Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Done in commit 7ab3cdb. The cross-platform tests are now combined into a single compatibility matrix that shows all encoder/decoder pairs including self-tests (C→C, C++→C++, Python→Python, TypeScript→TypeScript). Changes:
Example output: |
|
The cross platform tests are failing. Please check why.: |
…roperly clean up copied files Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Fixed in commit 0261476. The issue was that the test runner tried to copy files even when source and destination were the same (e.g., C→C test), causing "same file" errors. Root cause: When testing self-tests (C→C, Python→Python, etc.), the code attempted Fix: Added check to only copy file if source and destination are different: Current results: The remaining failures (C++→C and C++→Python) are due to a pre-existing compatibility issue in C++ code generation - C++ uses different struct packing for arrays, making its binary format incompatible with C/Python. This is correctly identified by the tests and needs to be fixed in the code generator itself. |
|
@copilot How is C++ able to decode for everything? Please also add a TS row to the matrix. |
|
@copilot please address my comment |
|
@copilot please address the issues |
|
@copilot continue |
|
@copilot please continue |
|
@copilot continue |
…ipt row to compatibility matrix Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
|
@copilot continue |
Addressed in commit e583c70. All three questions have been resolved: 1. Why C++ encoding and TypeScript decoding is passing: 2. Why C++ can decode everything (clarification):
C++ as encoder (row) fails with C and Python due to different array packing in code generation. 3. TypeScript row added to matrix: TypeScript creates minimal frames that only C++ and TypeScript can decode (C and Python expect full message structure). |
Update Test Suites
Summary
Refactored test suites to implement BasicPacket encode/decode cycles for basic types and arrays tests, renamed serialization tests to cross-platform tests with JSON-based validation, created a unified compatibility matrix showing all encoder/decoder pairs, and removed STDIN/STDOUT streaming tests.
Changes Made
Test Structure Updates
test_cross_platform_serialization, populate fromexpected_values.jsonand write to binary filestest_cross_platform_deserialization, read binary files from all languages and validate against JSONCross-Platform Validation
tests/expected_values.jsonas single source of truth for test data{language}_test_data.bincross_platform_test.py, encoder/decoder files)TypeScript Fixes
../../../expected_values.jsoninstead of../../expected_values.json)Final Compatibility Matrix
Compatibility Analysis
Matrix Interpretation:
Known Compatibility Issues:
Full Compatibility:
Test Results
26/31 tests passing (83.9% success rate)
All basic types and arrays tests pass ✅
Cross-platform matrix correctly identifies pre-existing compatibility issues
All 4 languages included in compatibility testing
Fixes Update Test Suites #25
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.